<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="/html/js/axios.min.js"></script>
    <script src="/html/js/ajax.js"></script>
    <script src="/html/js/util.js"></script>
    <script>
        window.onload=function (){
            let info=getQuery("info");
            if (info == "noland"){
                getObject("infoDiv").innerHTML="对不起，请登录";
            }
        }
        async function land(){
            let info=await ajaxGet("/user/land",
                {userName:getObject("userName").value,
                pwd:getObject("pwd").value});
            if (info=="ok"){
                location.href="/html/userScope/index.html";
            }else {
                alert("登录失败")
            }
        }
    </script>
</head>
<body>
    <div id="infoDiv" style="color: red;font-size: 12px"></div>
    用户名:<input type="text" id="userName"><br>
    密码:<input type="password" id="pwd"><br>
    <input type="button" value="登录" onclick="land()">
</body>
</html>